import MicroTime.Constants;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * @author HuBiWei
 * @create 2022/6/8
 */
public class Test {
    public static void main(String[] args) {
        JSONObject jsonObject = JSON.parseObject("{\"id\":\"c416bae8a204c6780114cc854415017b\",\"micro_down_time\":\"2022-06-05 23:59:56\",\"micro_on_during_time\":2695,\"micro_on_time\":\"2022-06-05 23:59:54\",\"room_no\":\"798752\",\"user_id\":9116913}");
        ArrayList<String> list = new ArrayList<>(Arrays.asList(Constants.MICRO_ON_TIME_COLOUMNS));
        String key = list.get(0);
        System.out.println("key==>"+key);
        for (int i = 1; i < list.size(); i++) {
            String column = list.get(i);
            String value = jsonObject.getString(column);
            System.out.println(column+"===>"+value);
        }

    }
}
